package com.ray.friendslist.service.common;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public abstract class CommonService extends Service {

	public static String ACTION_ON_SUCCESS = "com.ray.friendslist.service.ACTION_ON_SUCCESS";

	public static String ACTION_ON_ERROR = "com.ray.friendslist.service.ACTION_ON_ERROR";

	public static final String EXTRA_KEY_MESSAGE = "error message";

	@Override
	public IBinder onBind(Intent arg0) {
		return null;
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		task(intent);
		return START_NOT_STICKY;
	}

	protected abstract void task(Intent intent);
}
